<?php
/**
 * Contact Band Header
 */

/* @var $contact Shama\Contact */
$contact = Xview::instance()->component("contacts", "contact");
$data = $contact->getData();
$html= null;
if(!empty($data['email']))
{
	$html .= '<span class="contactDetail">
				<img class="icon email" src="'.Xview::emptyImageLocation().'" />
				<a class="slink" target ="_blank" href="mailto:'.$data['email'].'">
				'.$data['email'].'
				</a>
			</span>';
}
if(!empty($data['phone1']))
{
	$html .= '<span class="contactDetail">
				<img class="icon phone" src="'.Xview::emptyImageLocation().'" />
				<a class="slink" target ="_blank" href="callto:'.$data['phone1'].'">
				'.$data['phone1'].'
				</a>
			</span>';
}
if(!empty($data['phone2']))
{
	$html .= '<span class="contactDetail">
				<img class="icon phone" src="'.Xview::emptyImageLocation().'" />
				<a class="slink" target ="_blank" href="callto:'.$data['phone2'].'">
				'.$data['phone2'].'
				</a>
			</span>';
}
return $html;